package cn.com.jonpad.service.impl;

import cn.com.jonpad.api.vo.Result;
import cn.com.jonpad.api.vo.UserVo;
import cn.com.jonpad.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Mr.Yangxiufeng
 * Date: 2018-06-13
 * Time: 10:56
 */
@Service
@Slf4j
public class UserServiceImpl implements UserService {
    @Override
    public Result<UserVo> findByUsername(String username) {
        log.info("调用{}失败","findByUsername");
        User user = new User(username, "getPassword",
                true, true, true, true, new ArrayList<>());
        //Result.failure(100,"调用findByUsername接口失败");
        return Result.ok(user);
    }
}
